<template>
	<view class="box">
		<u-parse :html="detail"></u-parse>
		<u-empty v-show="!detail" style="margin-top:100rpx" text="暂时没有数据" mode="list"></u-empty>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: ''
			}
		},
		onLoad(option) {
			// type: 1 问答 2 营销
			if (option.type == 1) {
				this.getDetail(option.id)
			}
			if (option.type == 2) {
				this.getMarketingCaseDetail(option.id)
			}
			
		},
		methods: {
			getDetail(id) {
				this.$u.api.businessFaqDetail({id: id}).then(res => {
					this.detail = res
				})
			},
			getMarketingCaseDetail(id) {
				this.$u.api.marketingCaseDetail({id: id}).then(res => {
					this.detail = res
				})
			}
		}
	}
</script>

<style scoped>
	.box {
		padding: 30rpx;
	}
</style>
